.indicator-tree-panel {
  position: relative;
  background: white;
  border-right: 1px solid #e8e8e8;
  transition: all 0.3s ease;
  min-height: 830px;
  z-index: 100;

  &.collapsed {
    width: 48px;

    .collapsed-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 60px;
      padding: 16px 8px;

      .collapsed-icon {
        font-size: 18px;
        color: #666;
        margin-bottom: 8px;
      }

      .collapsed-text {
        font-size: 12px;
        color: #666;
        writing-mode: vertical-rl;
        text-orientation: mixed;
      }
    }
  }

  .collapse-trigger {
    position: absolute;
    top: 16px;
    right: 8px;
    z-index: 101;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;

    &:hover {
      color: #1890ff;
      border-color: #1890ff;
      background: #f0f8ff;
    }
  }

  .resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    cursor: col-resize;
    background: transparent;
    z-index: 101;

    &:hover {
      background: #1890ff;
      opacity: 0.5;
    }
  }

  .floating-add-button {
    position: fixed;
    bottom: 60px;
    left: 280px;
    z-index: 102;
    transition: left 0.3s ease;
  }

  /* 当侧边栏折叠时，隐藏添加按钮 */

  &.collapsed .floating-add-button {
    display: none;
  }

  .tree-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;

    .search-section {
      margin-bottom: 16px;
    }

    .indicator-categories {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;

      // 自定义滚动条样式
      &::-webkit-scrollbar {
        width: 6px;
      }

      &::-webkit-scrollbar-track {
        background: #f5f5f5;
      }

      &::-webkit-scrollbar-thumb {
        background: #d9d9d9;
        border-radius: 3px;

        &:hover {
          background: #bfbfbf;
        }
      }

      .category-section {
        margin-bottom: 24px;

        .category-header {
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-bottom: 12px;
          padding-bottom: 8px;
          border-bottom: 1px solid #f0f0f0;

          h4 {
            margin: 0;
            font-size: 14px;
            font-weight: 600;
            color: #262626;
          }
        }

        .tree-wrapper {
          :deep(.ant-tree) {
            .ant-tree-node-content-wrapper {
              display: flex;
              flex: 1;

              .ant-tree-title {
                width: 100%;
                display: flex;
                justify-content: space-between;
                align-items: center;

                .tree-node-title {
                  display: flex;
                  justify-content: space-between;
                  align-items: center;
                  width: 100%;

                  .node-title {
                    flex: 1;

                    &.search-highlight {
                      background: #fff3cd;
                      color: #856404;
                      padding: 0 2px;
                      border-radius: 2px;
                    }

                    &.node-title-clickable {
                      cursor: pointer;
                      transition: color 0.3s;

                      &:hover {
                        color: #1890ff;
                        text-decoration: underline;
                      }
                    }
                  }

                  .node-actions {
                    display: none;
                    gap: 4px;
                    align-items: center;

                    .ant-switch {
                      margin-right: 4px;
                    }

                    .anticon {
                      padding: 2px;
                      border-radius: 2px;
                      cursor: pointer;
                      color: #666;

                      &:hover {
                        background: #f0f0f0;
                        color: #1890ff;
                      }
                    }
                  }
                }

                &:hover .node-actions {
                  display: flex;
                }
              }
            }

            .ant-tree-checkbox {
              margin-block-start: 0;
              margin-right: 8px;
            }
          }
        }
      }
    }
  }

  .search-highlight {
    background: #fff3cd !important;
    color: #856404 !important;
    padding: 0 2px;
    border-radius: 2px;
  }
}